﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

public partial class ShowInfo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        StreamReader reader = new StreamReader("D:\\qqlog\\logfile.txt");
        string content = reader.ReadToEnd();
        reader.Close();        
    }

    protected void showMobDes(string content) 
    {
        string[] lines = content.Split(new string[] { "\r\n" }, StringSplitOptions.None); 
    }

    protected void showlogInfo(string content) 
    {
        List<Info> infos = new List<Info>();
        string[] lines = content.Split(new string[] { "\r\n" }, StringSplitOptions.None);
        foreach (string line in lines)
        {
            try
            {
                Info info = new Info();
                string[] args = line.Split(new char[] { ',' });
                info.Mob = args[0];
                info.QQ = args[1];
                infos.Add(info);
            }
            catch { }
        }

        var t = infos.Select(a => new { a.Mob }).Distinct().ToList();

        Response.Write(infos.Count);
        Response.Write(",");
        Response.Write(t.Count);
    }

    public struct Info 
    {
        public string Mob { get; set; }
        public string QQ { get; set; }
    }
}